'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {

  const { router, controller } = app;
  // router.get('/', controller.home.index);
  // test用
  router.get('/', controller.home.index);
  /* 增 */
  router.post('/clazz/create', controller.clazz.create);

  /* 删 */
  router.delete('/clazz/destroy/:id', controller.clazz.destory);

  /* 通过id查询 */
  router.get('/clazz/showById', controller.clazz.showById);

  /* 查看所有 */
  router.get('/clazz/Allshow', controller.clazz.Allshow);

  /* 修改 */
  router.put('/clazz/update/:id', controller.clazz.update);

  // router.resources("clazz", "/clazz", controller.clazz)
  // router.resources("student", "/student", controller.student)
  // router.get('/login', controller.home.login);
  // router.post('/login', controller.home.doLogin);
  // router.post('/logout', controller.home.logout);
  // router.get("/jwt", controller.jwt.index)
  // router.post("/jwtlogin", controller.jwt.doLogin)
  // router.get("/jwtmessage", app.middleware.checktoken(), controller.jwt.getMessage)
};
